﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Guest.Master" AutoEventWireup="true" 
CodeBehind="ReadWorkArea.aspx.cs" Inherits="ScrumLite.WebUx.RequestsViews.ReadWorkArea"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h1><%= ViewData.ProjectName%></h1>
    <hr />
	<form action="<%=Url.Action( new { Action = "Classify" })%>" method= "post" >
    <div class="actions">
	    <a href="javascript:void(0);" tabindex="8" onclick="javascript:document.forms[0].submit();">Save</a>&nbsp;
        <%=Html.ActionLink("Cancel", new { Action="Read", Mode="All" })%>
	</div><br />
        <fieldset>
            <% if (ViewData.WorkAreas.Count == 0) { %>
                There are no work areas defined for this project.<br />
                You can create them <%=Html.ActionLink( "here", "New", "WorkAreas" ) %>
            <% } else { %>
                <b>Assign workareas to the selected request</b><br />
                <% foreach (ScrumLite.Services.Contracts.WorkArea area in ViewData.WorkAreas) 
                   {
                       bool chk = (ViewData.CurrentWorkAreas.Where(a => a.Id == area.Id).Count() > 0);
                %>
                    <%= Html.CheckBox("chkWorkArea", area.Name, area.Id, chk)%><br />
                <%} %>                        
            <% } %>
        </fieldset>
    <br />
    <div class="actions">
	    <a href="javascript:void(0);" tabindex="8" onclick="javascript:document.forms[0].submit();">Save</a>&nbsp;
        <%=Html.ActionLink("Cancel", new { Action="Read", Mode="All" })%>
	</div>    
    </form>
</asp:Content>
